package MissionTransport;

public class Paizhang extends Approver{
    private String name;

    public Paizhang(String name) {
        this.name = name;
    }

    @Override
    public void processRequest(MissionRequest request) {
        if(request.getEnemyNum()<=50){
            System.out.println("敌人人数小于50人，排长有权下达作战命令");
            System.out.println("排长["+name+"]下达作战命令完成，打败了["+request.getEnemyNum()+"]个敌人");
        }else{
            System.out.println("敌人人数大于等于50人，排长无权下达作战命令，移交营长");
            successor.processRequest(request);
        }
    }
}
